#include <object/transform.h>
#include <vector3.h>

Transform::Transform( vector3 position, vector3 rotation ) {
    Transform::position = position;
    Transform::rotation = rotation;
    Transform::scale = vector3(1, 1, 1);
}

Transform::Transform() {
    Transform::position = vector3(0, 0, 0);
    Transform::rotation = vector3(0, 0, 0);
    Transform::scale = vector3(1, 1, 1);
}

void Transform::setX( double x ) {
    Transform::position.x = x;
}

void Transform::setY( double y ) {
    Transform::position.y = y;
}

void Transform::setZ( double z ) {
    Transform::position.z = z;
}

void Transform::setPosition( vector3 axis ) {
    Transform::position.x = axis.x;
    Transform::position.y = axis.y;
    Transform::position.z = axis.z;
}

void Transform::translate( vector3 direction ) {
    Transform::position.x += direction.x;
    Transform::position.y += direction.y;
    Transform::position.z += direction.z;
}

double Transform::returnX() {
    return Transform::position.x;
}

double Transform::returnY() {
    return Transform::position.y;
}

double Transform::returnZ() {
    return Transform::position.z;
}
